package com.yizhang.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: yi.zhang
 * @CreateTime: 2025-06-25 14:04:49
 * @Description: mvc配置
 */
@Component
public class MyWebMvcConfigurer implements WebMvcConfigurer {

    /**
     * 代替 <mvc:default-servlet-handler/> 访问静态资源
     * @param configurer
     */
    @Override
    public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
        configurer.enable();
    }
}
